<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
	.parent{
		position:relative;    /* position을 설정하지 않으면 static으로 처리 된다. */
		width:400px;
		height:400px;
		background:yellow;
	}
	
	.child{
		position:absolute;
		top:0px;
		right:0px;
		width:40px;
		height:40px;
		background:green;
	}
	.fix{
		position:fixed;
		bottom:0px;
		right:0px;
		height:100px;
		width:100px;
		background: gray;
	}
</style>
</head>
<body>
	<div id="parent" class="parent">
		<div id="child" class="child"></div>
	</div>
	
	<div class="fix">this is fixed</div>
</body>
</html>